package io.agilefast.modules.customer.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.agilefast.modules.customer.entity.CustomerIndustryEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;

/**
 * description: CustomerIndustryDao
 * date: 2025/4/9 15:35
 * author: ouhongyan
 * version: 1.0
 */
public interface CustomerIndustryDao extends BaseMapper<CustomerIndustryEntity> {
    @Delete("DELETE FROM customer_info WHERE customer_id = #{id}")
    int deleteById(Long id);
    @Update("UPDATE customer_info SET customer_name = #{customerName}, gender = #{gender}, " +
            "contact_number = #{contactNumber}, landline_number = #{landlineNumber}, address = #{address}, " +
            "birth_date = #{birthDate}, industry = #{industry}, business_type = #{businessType}, " +
            "customer_status = #{customerStatus}, profile_picture = #{profilePicture}, " +
            "modify_date = #{modifyDate}, modify_by = #{modifyBy}, modify_name = #{modifyName} " +
            "WHERE customer_id = #{customerId}")
    int updateById(CustomerIndustryEntity entity);

}
